#include "../source/server.hpp"

int main()
{
    Socket st;
    st.CreateClient(8888, "127.0.0.1");
    int cnt = 5;
    while(cnt--)
    {
        std::string message = "hello server!";
        st.Send(message.c_str(), message.size());
        char buf[1024] = {0};
        st.Rcev(buf, sizeof(buf)-1);
        lg(Debug, "client recv a message: %s", buf);
        sleep(1);
    }
    while(true)
    {
        std::cout << "client sleep..." << std::endl;
        sleep(1);
    }
    return 0;
}